package com.sunny.dataobject;

import com.sunny.enums.OrderStatusEnum;
import com.sunny.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by dell on 2018/3/29.
 */
@Entity
@Data
@DynamicUpdate   //这样才会更新updateTime时间
public class OrderMaster {
    @Id
    private String orderId;//订单id

    private String buyerName;//买家名字

    private String buyerPhone;//买家手机号

    private String buyerAddress;//买家地址

    private String buyerOpenid;//买家微信openid

    private BigDecimal orderAmount;//订单总金额

    private Integer orderStatus= OrderStatusEnum.NEW.getCode();//订单状态，默认0新下单

    private Integer payStatus= PayStatusEnum.WAIT.getCode();//支付状态，默认0未支付，

    private Date  createTime;//创建时间

    private Date updateTime;//更新时间


}
